const { merge } = require('webpack-merge');
const path = require('path');
const base = require('./webpack.base.js');

module.exports = merge(base ,{
    mode:'development',
    devServer:{
        open:true,
        port:8080,
        static:[
            path.resolve(__dirname,'dist'),
            path.resolve(__dirname,'public')
        ]
    },
    devtool:'inline-source-map',
    module:{
        rules:[
            {
                test:/\.css$/,
                use:[
                    {loader:'style-loader'},
                    {loader:'css-loader'},
                    {loader:'postcss-loader'}
                ]
            },
            {
                test:/\.scss$/,
                use:[
                    {loader:'style-loader'},
                    {loader:'css-loader'},
                    {loader:'postcss-loader'},
                    {loader:'sass-loader'},
                ]
            }
        ]
    }
})